home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2006 May / PCWMAY06.iso / Software / Freeware / First Page 2006 3.00 / fp2006-final-3.00-setup.exe / {app} / Iscripts / Windows & Frames / left-to-right-scrolling-window.izs < prev    next >
Text File  |  2005-07-29  |  2KB  |  99 lines

  1. <!NOWIZARD>
  2.  
  3. <!TITLE>Left-To-Right Scrolling Window 
  4. <!/TITLE>
  5.  
  6. <!DESCRIPTION>An advanced scrolling window script that scrolls the window from left to right, then all over again.
  7. <!/DESCRIPTION> 
  8.  
  9. <!CATEGORY>windows, remotes, frames<!/CATEGORY>
  10.  
  11. <!SCRIPT>
  12. <!-- START OF SCRIPT -->
  13. <script language="JavaScript1.2">
  14.  
  15.  
  16. var currentpos=0,alt=1,curpos1=0,curpos2=-1
  17. function initialize(){
  18. startit()
  19. }
  20. function scrollwindow(){
  21. if (document.all)
  22. temp=document.body.scrollLeft
  23. else
  24. temp=window.pageXOffset
  25. if (alt==0)
  26. alt=1
  27. else
  28. alt=0
  29. if (alt==0)
  30. curpos1=temp
  31. else
  32. curpos2=temp
  33. if (curpos1!=curpos2){
  34. if (document.all)
  35. currentpos=document.body.scrollLeft+2
  36. else
  37. currentpos=window.pageXOffset+2
  38. window.scroll(currentpos,0)
  39. }
  40. else{
  41. currentpos=0
  42. window.scroll(currentpos,0)
  43. }
  44. }
  45. function startit(){
  46. setInterval("scrollwindow()",10)
  47. }
  48. window.onload=initialize
  49. </script>
  50.  
  51.  
  52. <!-- END OF SCRIPT -->
  53. <!/SCRIPT>
  54.  
  55. <!PREVIEW>
  56. <!-- START OF SCRIPT -->
  57. <script language="JavaScript1.2">
  58.  
  59.  
  60. var currentpos=0,alt=1,curpos1=0,curpos2=-1
  61. function initialize(){
  62. startit()
  63. }
  64. function scrollwindow(){
  65. if (document.all)
  66. temp=document.body.scrollLeft
  67. else
  68. temp=window.pageXOffset
  69. if (alt==0)
  70. alt=1
  71. else
  72. alt=0
  73. if (alt==0)
  74. curpos1=temp
  75. else
  76. curpos2=temp
  77. if (curpos1!=curpos2){
  78. if (document.all)
  79. currentpos=document.body.scrollLeft+2
  80. else
  81. currentpos=window.pageXOffset+2
  82. window.scroll(currentpos,0)
  83. }
  84. else{
  85. currentpos=0
  86. window.scroll(currentpos,0)
  87. }
  88. }
  89. function startit(){
  90. setInterval("scrollwindow()",10)
  91. }
  92. window.onload=initialize
  93. </script>
  94.  
  95.  
  96. <!-- END OF SCRIPT -->
  97. <!/PREVIEW>
  98.  
  99. <!RELATED>NONE<!/RELATED>